<?php
include './wechat.class.php';
$options = array(
	'token'=>'eTlre9R175DLNnbg8owJm1FHiYSSUJWN', //填写你设定的key
	'encodingaeskey'=>'U7iTD5hIVZlLwS1eDQh82plgge4Prb2FkYTDvSRajEm', //填写加密用的EncodingAESKey
	'appid'=>'wx0774ba4f6f80ec86', //填写高级调用功能的app id
	'appsecret'=>'168bf2e6ecddf7a17dc835793b0efc7a' //填写高级调用功能的密钥
);
$ret_menu ['button'] = array(
  array(
    'name' => '我要报价',
    'url' => 'https://driver.tuniaoapp.com/?#',
    'type' => "miniprogram",
    'appid' => 'wx88fcf560c8c1f6d1',
    'pagepath' => '/pages/index/index'
  ),
  array(
    'name' => '我的运单',
    'type' => "miniprogram",
    'appid' => 'wx88fcf560c8c1f6d1',
    'pagepath' => '/pages/waybill/waybill',
    'url' => 'https://driver.tuniaoapp.com/?#/order'
  ),
  array(
    'name' => '我的服务',
    'sub_button' => array(
      array(
        'type' => "click",
        'name' => '在线客服',
        'key' => 'TNKEFU_1001'
      ),
      array(
        'type' => "view",
        'name' => '常见问题',
        'url' => 'http://driver.tuniaoapp.com/?#/help'
      ),
      array(
        'type' => "view",
        'name' => '招商加盟',
        'url' => 'http://oss.tuniaoapp.com/html/join/join1.html'
      ),
     array(
      'type' => "view",
      'name' => 'App下载',
      'url' => 'https://www.tuniaokeji.com/apps.html?123'
     )
    )
  )
);
$weObj = new Wechat($options);
echo $weObj->createMenu($ret_menu);
print_r($weObj->getMenu());
?>
